SiteExport Plugin Config

The SiteExport Plugin is used to export the User Manual (compressed siteexport.zip with multiple page html & images). The Opencpn_User_Manual TOC page:

See opencpn:opencpn_user_manal:toc

is used to provide a “hyperlinked page-by-page” Table of Contents which is required to export the User Manual.

IndexMenu Plugin Code to create the TOC

There is more information about configuration of the IndexMenu Plugin & TOC here, but the syntax and code we need in the TOC page to create the Flat open TOC is:

CODE: {{indexmenu>:opencpn:opencpn_user_manual#5|msort nsort nojs}}   

See opencpn:opencpn_user_manal:toc for the result.

To see this code, navigate to the TOC page above and use DWedit (right hand menu second button from the bottom to expose the code, you need edit rights).

Exporting Steps

  1. Navigate to the OpenCPN User Manual TOC.
  2. ADMIN > ADDITIONAL PLUGINS (toward the bottom) > SITE EXPORT
  3. Make sure the settings are configuration_settings_which_work as below.
  4. 3 Optional Start Buttons: Used to copy code from one of the buttons for a given download method. Each button has parameters from the configuration settings and code that can be copied to the clipboard.
    1. Top Button - Direct http download code
    2. Middle Button - Wget download code
    3. Bottom Button - Curl download code
  5. Hit SAVE This results in reading each page and finally a Download prompt.
  6. The plugin immediately starts “Adding “opencpn:developer_manual:vector_palette” ( 10 / 73 )”
  7. Blue stripes running across or it failed
  8. Also you can hit “Update”

Configuration Settings used in 1/2018

The settings used were: From the Offline TOC page OR Opencpn User Manual page

  1. Select from the page's right menu, the icon second from the bottom Export SiteExport
  2. Set Namespace= _opencpn:opencpn_user_manual:toc_offline_plugins_manual_
  3. Parent Namespace to Export= _opencpn:opencpn_user_manual:toc_offline_plugins_manual_
  4. Select _Export all subnamespaces_
  5. To begin disable the “Export linked pages” option. Once it processes completely, then _Check_ to have Links in the document.
  6. Export all parameters “do” _Check_
  7. Render Engine: _ckedit_
  8. Template: _dokuwiki_
  9. Everything else is _unchecked_.
  10. Just hit Start ( without first hitting one of the three “Direct”, “Wget” or “Curl”)
  11. When clicking the start button it should show you that it will export x/y pages.
  12. Starts out: _Adding “opencpn:opencpn_user_manual:advanced_features:network_repeater” ( 29 / 385 )_
  13. When the plugin completes you will be prompted to download the siteexport.zip file.

Configuration Settings which work

Except levels and Exclusion.

  1. Note: Export of other Books is similar, but with the path changed.
  2. Set Namespace: opencpn:opencpn_user_manual:toc ←Point to TOC!
  3. Parent Namespace to export: opencpn:opencpn_user_manual ←Point to parent namespace!
  4. Export Type: Specified Depth or This Page, All Subnamespaces (but includes blank pages)
  5. Depth: 5
  6. Export Linked Pages:checked ←Want linked html pages - is this what it does?
  7. Export all parameters (eg. “do”): checked ←What the parameters & what does this do?
  8. Render Engine: ckgedit or dw2pdf, sitepdf, etc.
  9. Export Template: bootstrap3
  10. Use TOC in Namespace: Not Checked ←what is this used for?
  11. Empty namespaces in TOC: Not Checked ←what is this used for?
  12. Default Lang: EN
  13. Disable JavaScript in Plugins: “un-checked” ←better to leave it off if possible.
  14. All other parameters are left not checked.

Admin > Config down to SiteExport Settings which work

These are the settings which should be used in the Admin > Config down to SiteExport

Parameter Description Value
plugin export allowallusers Checked
plugin siteexport default depth 7
plugin siteexport zipfilename opencpn:siteexport.zip
plugin siteexport exclude pdf zip 7z edit_user_manual blank cruisersforum gallery_boats place_view github
plugin siteexport max_execution_time 2400
plugin siteexport ignoreNon200 checked
plugin siteexport ignoreAJAXError checked
plugin siteexport debugLevel Error
plugin siteexport debugFile debug3.txt
plugin siteexport cachetime 60*60*24
plugin siteexport PDFHeaderPagebreak 1
plugin siteexport seOddEven not checked
plugin siteexport defaultAuthenticationUser admin
plugin siteexport defaultAuthenticationPassword blank
plugin siteexport useProxy blank
plugin siteexport offSiteLinkTemplate

IndexMenu Plugin Code : Detail

To Export OpenCPN User Manual TOC we want a non-expandable flat TOC with every page shown in proper order.

{{indexmenu>:opencpn:opencpn_user_manual#5|msort nsort nojs}}

  1. Use the User Manual path ':opencpn:opencpn_user_manual'
  2. Use '#6' to 'open' the tree down 6 levels.
  3. Use 'msort' to sort pages by their meta tag indexmenu_n>N
  4. Don't use 'navbar' because it is not needed.
  5. Use 'nojs' Don't use javascript because tree is open.

Three Method Buttons above SAVE : Detail

Top Button - https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn&addParams=1&defaultLang=en&depth=4&depthType=0.0&do=siteexport&ens=opencpn&exportLinkedPages=1&renderer=&template=bootstrap3

Middle Button - wget --max-redirect=4 --output-document=siteexport.zip --post-data="id=opencpn&addParams=1&defaultLang=en&depth=4&depthType=0.0&do=siteexport&ens=opencpn&exportLinkedPages=1&renderer=&template=bootstrap3" https://opencpn.org/wiki/dokuwiki/doku.php?id=doku.php --http-user=USER --http-passwd=PASSWD

Bottom Button - curl -L --max-redirs 4 -o siteexport.zip -d "id=opencpn&addParams=1&defaultLang=en&depth=4&depthType=0.0&do=siteexport&ens=opencpn&exportLinkedPages=1&renderer=&template=bootstrap3" https://opencpn.org/wiki/dokuwiki/doku.php?id=doku.php --anyauth --user USER:PASSWD

It's not working : Where is the debug file?

Debugging must be activated from ADMIN > CONFIG and Browser file>“find” “siteexp” go down and change these parameters:

plugin»siteexport»debugFile
Debug File debug3.txt

plugin»siteexport»zipfilename
Wiki Path and name for exported ZIP file opencpn:siteexport.zip

plugin»siteexport»exclude
Pattern to exclude resources .gov|favicon|advanced_chart_work|gshhshires

Use Media Manager to locate the Debug File

Then click on the Home button, from the dropdown button pick Media Manager

https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn&do=media&ns=

and look under the directories for root then look for the debug.txt file or in our case debug3.txt. You can click on it to get it into the window, then click on the file name to download it. View it with something like NotePad++. The last error will be at the end.

Each time SiteExport is used it leaves a file here, browse to root:opencpn directory. Use Media Manager to see

https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn&do=media&ns=debug3.txt